<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('付款申请单打印')" />
	<style type="text/css">
	body {
			overflow-x: auto;
		}
		table {
			font-size: 14px;
			font-weight:500;
			font-family: 线体;
			margin-left: 50px;
	    	border-collapse: collapse;
		}
	    table, tr, td{
		    text-align: center;
		    width: 1200px;
		    height: 40px;
		}
		.items td{ height:30px; border: 1px solid black;}
		
		@media print{
		   body {
		       height: auto !important;
		   }
		}
	</style>
</head>
<body class="white-bg">
    <table style="margin-top: 0px;">
		<!-- 打印网页时通过hidden-print隐藏元素 -->
	    <div class="text-right hidden-print">
	        <input th:value="${obj.id}" type="hidden" id="id" name="id" />
            <button id="button-yes" type="button" class="btn btn-sm btn-primary" ><i class="fa fa-check"></i>审核通过</button>&nbsp;
            <button id="button-no" type="button" class="btn btn-sm btn-danger" ><i class="fa fa-remove"></i>审核拒绝</button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
	    </div>
		<tr style="height: 60px;">
			<td style="text-align: left;"><img style="height: 30px" src="/ruoyi.png"></td>
			<td colspan="14" style="font-size: 30px;font-family: 线体;font-weight:500;">湖北鄂能电力建设有限公司-费用报销单</td>
		</tr>
		<tr>
			<td style="width: 12%;text-align: left;"><b>时间：<span th:text="${#dates.format(obj.bxrAt, 'yyyy年MM月dd日')}"></span></b></td>
			<td style="width: 10%">&nbsp;</td>
			<td style="width: 12%">&nbsp;</td>
			<td style="width: 27%" colspan="6">&nbsp;</td>
			<td style="width: 7%" ><b>类型</b></td>
			<td style="width: 7%;text-align: left;" colspan="2" th:text="${obj.type}">&nbsp;</td>
			<td style="width: 10%" colspan="2"><b>编号：</b><span th:text="${obj.orderNo}">&nbsp;</span></td>
		</tr>
	</table>
	<table class="items">
		<tr>
			<td colspan="2" style="width: 50%;"><b>支付事项摘要说明</b></td>
			<td style="width: 20%;"><b>发票类型</b></td>
			<td colspan="10"><b>金&nbsp;&nbsp;额</b></td>
			<td style="width: 10%;"><b>备&nbsp;&nbsp;注</b></td>
		</tr>
		<!-- 
		<tr>
			<td><b>仟</b></td>
			<td><b>佰</b></td>
			<td><b>拾</b></td>
			<td><b>万</b></td>
			<td><b>仟</b></td>
			<td><b>佰</b></td>
			<td><b>拾</b></td>
			<td><b>元</b></td>
			<td><b>角</b></td>
			<td><b>分</b></td>
		</tr> -->
		<tr th:each="lis,status:${obj.item}">
			<td colspan="2" th:text="${lis.descs}">&nbsp;</td>
			<td th:text="${lis.type}">&nbsp;</td>
			<td colspan="10">
			<span th:text="${lis.jine == null} ? '' : '¥'" />
			<span th:text="${lis.jine == null} ? '' : ${lis.jine}" /></td>
			<td th:text="${lis.memo}">&nbsp;</td>
		</tr>
		<tr>
			<td colspan="2"><b>合计金额(小写)</b></td>
			<td colspan="12"><span th:text="${obj.hejexx}">&nbsp;</span></td>
		</tr>
		<tr>
			<td colspan="2"><b>合计金额(大写)</b></td>
			<td colspan="12"><span th:text="${obj.hejedx}">&nbsp;</span></td>
		</tr>
	</table>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        function printPage() {
            window.print();
        }
        
        $("#button-yes").click(function(){
	    	$.modal.confirm("确认要审核通过吗?", function() {
	    		$.ajax({
    				url: "/gcgl/fyhx/cwyes",
    				type: "post",
    				data: { "ids": $("#id").val() },
    				dataType: 'json',
    				success: function(data) {
    					$.operate.saveReload(data);
    				},
    				error: function(xhr, type, errorThrown) {
    					//异常处理；
    					$.modal.alert("请稍后再试！");
    					$.operate.saveReload(data);
    				}
    			});
	    	});
	    })
	    
	    $("#button-no").click(function(){
	    	$.modal.confirm("确认要审核拒绝吗?", function() {
	    		$.ajax({
    				url: "/gcgl/fyhx/cwno",
    				type: "post",
    				data: { "ids": $("#id").val() },
    				dataType: 'json',
    				success: function(data) {
    					$.operate.saveReload(data);
    				},
    				error: function(xhr, type, errorThrown) {
    					//异常处理；
    					$.modal.alert("请稍后再试！");
    					$.operate.saveReload(data);
    				}
    			});
	    	});
	    })
    </script>
</body>
</html>